home *** CD-ROM | disk | FTP | other *** search
- .Na "dbordercol"
- .Aa
- .Fu
- Return the id of a column appearing in the most recently executed query's ORDER BY clause.
- .Ih "ORDER BY clause, determining the columns in"
- .Sy
- .Sf "int dbordercol(dbproc, order)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "int" "order"
- .Co
- .Bl
- This routine returns the id of the column that appears in a specified
- location within the ORDER BY clause of a SQL SELECT command.
- .sp
- For example, given the SQL statement:
- .SD
- .in +5n
- .ne 2
- select dept, name, salary from employee
- order by salary, name
- .in -5n
- .ED
- the call
- .I "dbordercol(dbproc, 1)"
- will return 3 since the first column named in the ORDER BY clause
- refers to the third column in the query's \f2select-list\f1.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .Pi order
- The id that identifies the particular ORDER BY column of interest.
- The first column named within the ORDER BY clause is number 1.
- .in -.375i
- .Re
- .br
- The column id (based on the column's position in the \f2select-list\f1)
- for the column in the specified place in the ORDER BY clause.
- If the
- .I order
- is invalid, \f2dbordercol()\f1 returns -1.
- .Sa
- DBNUMORDERS
-